<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('套餐名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" data-rule="required" name="row[combo_name]" placeholder="请输入套餐名称" id="" value="{$info['combo_name']|default=''}">
        </div>
    </div>

    <div class="form-group">
        <label for="" class="control-label col-xs-12 col-sm-2">套餐别名</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="row[combo_bname]" class="form-control" placeholder="填写别名" data-rule="required" value="{$info['combo_bname']|default=''}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('套餐分类')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select data-rule="required" class="form-control" name="row[category_id]" id="category">
                <option value="{$info['category_id']|default=''}">{$info['category_name']|default='请选择套餐'}</option>
                {volist name="categoryList" id="item"}
                {if condition="isset($info) && $item.category_id == $info['category_id']"}
                {else/}
                <option data-val="{$item.exam_time}" data-str="{$item.category_name}" value="{$item.category_id}">{$item.category_name}</option>
                {/if}
                {/volist}
            </select>
            <input type="hidden" name="row[category_name]" value="{$info['category_name']|default=''}" id="category_name">
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('售价')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-combo_price" data-rule="required" class="form-control" name="row[combo_price]" type="number" placeholder="请输入套餐价格" value="{$info['combo_price']|default=''}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('原价')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-combo_yprice" data-rule="required" class="form-control" name="row[combo_yprice]" type="number" placeholder="请输入优惠价格" value="{$info['combo_yprice']|default=''}">
        </div>
    </div>

    <div class="form-group">
        <label for="" class="control-label col-xs-12 col-sm-2">模块显示</label>
        <div class="col-xs-12 col-sm-8">
            <label>
                <input type="checkbox" name="row[is_module]" value="1" {eq name="$info['is_module']|default=0" value="1"}checked{/eq}>
                <span>模块显示</span>
            </label>
            <label>
                <input type="checkbox" name="row[is_index]" value="1" {eq name="$info['is_index']|default=0" value="1"}checked{/eq}>
                <span>首页展示</span>
            </label>
            <label>
                <input type="checkbox" name="row[is_bottom]" value="1" {eq name="$info['is_bottom']|default=0" value="1"}checked{/eq}>
                <span>底部导航</span>
            </label>
        </div>
    </div>

    <div class="form-group">
        <label for="" class="control-label col-xs-12 col-sm-2">学习入口</label>
        <div class="col-xs-12 col-sm-8">
            <label>
                <input type="radio" name="row[study_entry]" value="0" {eq name="$info['study_entry']|default=0" value="0"}checked{/eq}>
                <span>本站</span>
            </label>
            <label>
                <input type="radio" name="row[study_entry]" value="1" {eq name="$info['study_entry']|default=0" value="1"}checked{/eq}>
                <span>宝典</span>
            </label>
            <label>
                <input type="radio" name="row[study_entry]" value="2" {eq name="$info['study_entry']|default=0" value="2"}checked{/eq}>
                <span>助考</span>
            </label>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('套餐标签')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-combo_tags" rows="4" data-rule="required" class="form-control" name="row[combo_tags]" placeholder="请输入套餐标签请使用空格分割">{$info['combo_tags']|default=''}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('套餐介绍')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-combo_jieshao" data-rule="required" class="form-control" name="row[combo_jieshao]" placeholder="请输入套餐介绍" >{$info['combo_jieshao']|default=''}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('包含内容')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-combo_content_jieshao" data-rule="required" class="form-control" name="row[combo_content_jieshao]" placeholder="请输入包含内容" >{$info['combo_content_jieshao']|default=''}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否上架')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                <label for="row[combo_on]-1">
                    <input id="row[combo_on]-1" class="combo_on"
                           {if condition="isset($info['combo_on']) && $info['combo_on'] == 1"}checked {else/}checked{/if}
                           name="row[combo_on]" type="radio" value="1"> 是
                </label>
                <label for="row[combo_on]-0">
                    <input id="row[combo_on]-0" class="combo_on" name="row[combo_on]"
                           type="radio"
                           value="0"
                           {if condition="isset($info['combo_on']) && $info['combo_on'] == 0"}checked {/if}
                    > 否
                </label>
            </div>
            <div>
                <input type="text" class="datetimepicker form-control" placeholder="请选择上架时间" name="row[combo_on_time]" value="{$info['combo_on_time']|default=''}">
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="" class="control-label col-xs-12 col-sm-2">备注</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="row[remark]" class="form-control" placeholder="填写备注" value="{$info['remark']|default=''}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('有效期')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                <label for="row[combo_time]-1">
                    <input type="radio" class="combo_time" name="row[combo_type]" value="1" id="row[combo_time]-1" {eq name="$info['combo_type']|default=1" value="1"}checked{/eq}>年限
                </label>
                <label for="row[combo_time]-2">
                    <input type="radio" class="combo_time" name="row[combo_type]" value="2" id="row[combo_time]-2" {eq name="$info['combo_type']|default=1" value="2"}checked{/eq}>考季
                    <span class="text-danger error-tip"></span>
                </label>
            </div>
            <div class="m-t-5" style="width: 80px;margin-top: 10px;display: inline-block;">
                <input type="number" id="c-combo_time" data-rule="required" class="form-control" name="row[combo_time]" value="{$info['combo_time']|default=''}" placeholder="请输入">
            </div>

        </div>
    </div>
    <div class="form-group">
        <label for="c-avatar" class="control-label col-xs-12 col-sm-2">包含介绍图片:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-avatar" data-rule="" class="form-control" size="50" name="row[combo_img_jianjie]" type="text" value="{$info['combo_img_jianjie']|default=''}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> 上传</button></span>
                    <span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> 选择</button></span>
                </div>
                <span class="msg-box n-right" for="c-avatar"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-avatar"></ul>
        </div>
    </div>
    <div class="form-group">
        <label for="c-avatar" class="control-label col-xs-12 col-sm-2">包含介绍图片1:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-avatar" data-rule="" class="form-control" size="50" name="row[combo_img_jianjie1]" type="text" value="{$info['combo_img_jianjie1']|default=''}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> 上传</button></span>
                    <span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> 选择</button></span>
                </div>
                <span class="msg-box n-right" for="c-avatar"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-avatar"></ul>
        </div>
    </div>
    <div class="form-group">
        <label for="c-avatar" class="control-label col-xs-12 col-sm-2">套餐图片:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-avatar" data-rule="" class="form-control" size="50" name="row[combo_img]" type="text" value="{$info['combo_img']|default=''}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> 上传</button></span>
                    <span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> 选择</button></span>
                </div>
                <span class="msg-box n-right" for="c-avatar"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-avatar"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('排序')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-en_name" data-rule="required" class="form-control" name="row[sort]" type="number" placeholder="请输入排序" value="{$info['sort']|default='0'}">
        </div>
    </div>
    <input type="hidden" name="row[questid]" value="{$info['questsort']|default=0}">
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
